namespace Aesha.WoW.Broker.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class v10 : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.ItemClass", "Name", c => c.String(maxLength: 255, unicode: false));
            AddColumn("dbo.ItemSubClasses", "ItemClass_ItemClassId", c => c.Int());
            AlterColumn("dbo.ItemClass", "ItemClassId", c => c.Int(nullable: false));
            AddForeignKey("dbo.ItemSubClasses", "ItemClass_ItemClassId", "dbo.ItemClass", "ItemClassId");
            CreateIndex("dbo.ItemSubClasses", "ItemClass_ItemClassId");
        }
        
        public override void Down()
        {
            DropIndex("dbo.ItemSubClasses", new[] { "ItemClass_ItemClassId" });
            DropForeignKey("dbo.ItemSubClasses", "ItemClass_ItemClassId", "dbo.ItemClass");
            AlterColumn("dbo.ItemClass", "ItemClassId", c => c.Int(nullable: false, identity: true));
            DropColumn("dbo.ItemSubClasses", "ItemClass_ItemClassId");
            DropColumn("dbo.ItemClass", "Name");
        }
    }
}
